//
//  DZZDiscoverInfoCell.m
//  DZZTravel
//
//  Created by 杜东坡 on 16/7/13.
//  Copyright © 2016年 Eason. All rights reserved.
//

#import "DZZDiscoverInfoCell.h"

@interface DZZDiscoverInfoCell ()
@property (weak, nonatomic) IBOutlet UIImageView *imageVIew;
@property (weak, nonatomic) IBOutlet UILabel *titleLable;

@property (weak, nonatomic) IBOutlet UILabel *subTitle;
@property (weak, nonatomic) IBOutlet UILabel *saledLable;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UILabel *original;

@end

@implementation DZZDiscoverInfoCell



- (void)setCellWithModel:(DZZDisInfoModel *)model {
    


    [self.imageVIew sd_setImageWithURL:[NSURL URLWithString:model.url600x360]];
    NSLog(@"%@",model.url600x360);
    self.titleLable.text = model.productName;
    self.subTitle.text = [NSString stringWithFormat:@"[%@]%@",model.cityName, model.productTitleContent];
    self.priceLabel.text = [NSString stringWithFormat:@"%ld",model.price];
    self.saledLable.text = [NSString stringWithFormat:@"已售%ld", model.saledCount];
    if (model.price != model.originalPrice) {
        self.original.text = [NSString stringWithFormat:@"%ld",model.originalPrice];
    }else {
        
        self.original.text = nil;
        
    }
    
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
